-
Notifications
You must be signed in to change notification settings - Fork 3
Reintroduce minimal AbstractNetworkIterator interface code to express BP
#15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jack-dunham
wants to merge
13
commits into
ITensor:BeliefPropagation
Choose a base branch
from
jack-dunham:BeliefPropagation
base: BeliefPropagation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Reintroduce minimal AbstractNetworkIterator interface code to express BP
#15
jack-dunham
wants to merge
13
commits into
ITensor:BeliefPropagation
from
jack-dunham:BeliefPropagation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…at) (ITensor#4) Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org> Co-authored-by: Matt Fishman <mtfishman@users.noreply.github.com>
Co-authored-by: mtfishman <7855256+mtfishman@users.noreply.github.com> Co-authored-by: mtfishman <mfishman@flatironinstitute.org> Co-authored-by: Matt Fishman <mtfishman@users.noreply.github.com>
Member
|
Very interesting, I had vaguely wondered if the sweep_solve code could be used to help implement BP. Curious to hear more about it. |
Introduce `BeliefPropagationProblem` wrapper to hold the cache and the error `diff` field. Also simplifies some kwargs wrangling.
ff18fa3 to
013b8b4
Compare
kmk142789
approved these changes
Dec 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR expresses the BP code in terms of the
SweepIteratorandRegionIteratorinterface. It also defines a subtype ofAbstractProblemto host the BP relevant data structures (the cache and the diff).The
set_default_kwargssystem has also been simplified, instead being defined in terms of a singledefault_algorithmfunction.I think certain aspects could be improved depending on how "radical" we wish to be; this was sort of a "minimal viable example" of putting BP in
SweepIterator. For example, theAlgorithm"bp"type seems a bit redundant/is not used to its full potential.The first BP test (on MPS) passes always, but the test on the comb fails as the difference between the two values is sometimes slightly more than the tolerance
1e-14(tensors used are random). This should be exact to machine precision after a single iteration, no?